rcupdate: Make rcu_barrier() more paranoia-proof
authorKeir Fraser <keir@xen.org>
Fri, 14 Jan 2011 16:38:51 +0000 (16:38 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 14 Jan 2011 16:38:51 +0000 (16:38 +0000)
commite7adac50b0bd072af734d245204d70c054844eec
treef0aba7b867ddfec203bc488aac90ee6869666308
parentecc523710a45b2301866b023435517600aec09b9
rcupdate: Make rcu_barrier() more paranoia-proof

I'm not sure my original barrier function is correct. It may allow a
CPU to exit the barrier loop, with no local work to do, while RCU work
is pending on other CPUs and needing one or more quiescent periods to
flush the work through.

Although rcu_pending() may handle this, it is easiest to follow
Linux's example and simply call_rcu() a callback function on every
CPU. When the callback has executed on every CPU, we know that all
previously-queued RCU work is completed, and we can exit the barrier.

Signed-off-by: Keir Fraser <keir@xen.org>
xen/common/rcupdate.c